package file;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        // 文件
        //1.
        File file=new File("E:\\jsd2407\\demo.txt");
        File file1=new File("E:/jsd2407/demo.txt");
        File file2=new File("./demo.txt");



        System.out.println("文件名："+file.getName());
        System.out.println("文件大小："+file.length()+"字节");
        System.out.println("是否可读："+file.canRead());
        System.out.println("是否可写："+file.canWrite());
        System.out.println("是否隐藏:"+file.isHidden());
    }
}
